package tools.ihm;

import java.awt.Color;

import javax.swing.JButton;
import javax.swing.JToolTip;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.plaf.ColorUIResource;

@SuppressWarnings("serial")
public class JToolTipTextSilence extends JToolTip
{
	public JToolTipTextSilence(Color couleurFond, JButton bouton, String titre)
		{			
			String aspect = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
			try {
			  UIManager.setLookAndFeel(aspect);
			  SwingUtilities.updateComponentTreeUI(this);
			  }
			catch(Exception e) {
			  e.printStackTrace();
			  }
			
			bouton.setToolTipText(titre);
			UIManager.put("ToolTip.background", new ColorUIResource(couleurFond));
		}
	
	
}
